#include <QtGui/QGraphicsScene>
#include "qpicdemo.h"
#include "MyScene.h"

QPicDemo::QPicDemo(QWidget *parent, Qt::WFlags flags)
	: QMainWindow(parent, flags)
{
	ui.setupUi(this);

	init();
}

QPicDemo::~QPicDemo()
{

}

bool QPicDemo::init()
{
	if ( !createScene() )
		return false;

	return true;
}

bool QPicDemo::createScene()
{
	int x = height();
	int y = width();
	QMyScene* pScene = new QMyScene( 0, 0, width(), height() );
	ui.graphicsView->setScene( pScene );
	
	return true;
}
